﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GrainManage.Entities.Encrypt;
using GrainManage.Proxy.Util;
using System.Reflection;

namespace GrainManage.Proxy
{
    public class EncryptProxy : GrainManage.Interface.IEncrypt
    {
        public OutputGetPublicKey GetPublicKey(InputGetPublicKey input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetPublicKey>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputDesDecrypt DesDecrypt(InputDesDecrypt input)
        {
            var result = WebUtil.ExecuteByPost<OutputDesDecrypt>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputDesEncrypt DesEncrypt(InputDesEncrypt input)
        {
            var result = WebUtil.ExecuteByPost<OutputDesEncrypt>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputMd5Encrypt Md5Encrypt(InputMd5Encrypt input)
        {
            var result = WebUtil.ExecuteByPost<OutputMd5Encrypt>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputRsaDecrypt RsaDecrypt(InputRsaDecrypt input)
        {
            var result = WebUtil.ExecuteByPost<OutputRsaDecrypt>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputRsaEncrypt RsaEncrypt(InputRsaEncrypt input)
        {
            var result = WebUtil.ExecuteByPost<OutputRsaEncrypt>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }
    }
}
